package com.cloudlead.common.persistence;

import com.mysema.query.sql.RelationalPath;
import com.mysema.query.types.Predicate;
import com.mysema.query.types.path.PathBuilder;

/**
 * 查询条件构建器
 * 
 * @author dean.lu
 * 
 * @param <T>
 */
public interface Specification<T> {
	/**
	 * 构建查询条件
	 * 
	 * @param root
	 * @param builder
	 * @param entityPathResolver
	 * @return
	 */
	public Predicate toPredicate(RelationalPath<T> root,
			PathBuilder<T> builder, EntityPathResolver entityPathResolver);
}
